package com.ebelter.btcomlib.bases.fragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

public class FragmentUtil {


    public static void replaceFragment(FragmentManager fragmentManager, int containID,Fragment fragment){
        if (fragmentManager==null||fragment==null){
            return;
        }
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
        fragmentTransaction.replace(containID,fragment);
        fragmentTransaction.commit();
    }
    public static Fragment findFragmentById(FragmentManager fragmentManager, int containID){
        if (fragmentManager==null){
            return null;
        }
        return fragmentManager.findFragmentById(containID);
    }




}
